package com.lmk.ms.common.dto.mvc;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * 字段信息
 *
 * @author LaoMake
 * @email laomake@hotmail.com
 */
public class Column implements Serializable {

    /**
     * 字段名称
     */
    @JsonProperty("dataIndex")
    private String field;

    /**
     * 字段标题
     */
    private String title;

    /**
     * 自定义插槽配置
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ColumnSlot scopedSlots;

    public Column() {
    }

    public Column(String field, String title) {
        this.field = field;
        this.title = title;
    }

    public Column(String field, String title, ColumnSlot scopedSlots) {
        this.field = field;
        this.title = title;
        this.scopedSlots = scopedSlots;
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public ColumnSlot getScopedSlots() {
        return scopedSlots;
    }

    public void setScopedSlots(ColumnSlot scopedSlots) {
        this.scopedSlots = scopedSlots;
    }
}